(edn->json x)
(edn->json x options)
Recursively transforms ClojureScript values to JavaScript.
The encoded JSON will have extra notation to enable a better deserialization later, keeping complex keys, keyword keys (simple and qualified), also encode extended types like UUID and dates. Using json->edn you can restore the original data from the JSON.
Some things that don't get restored:
Other than that, all printable values should encode and decode with fidelity.
Recursively transforms ClojureScript values to JavaScript. The encoded JSON will have extra notation to enable a better deserialization later, keeping complex keys, keyword keys (simple and qualified), also encode extended types like UUID and dates. Using json->edn you can restore the original data from the JSON. Some things that don't get restored: - metadata is lost - number keys on maps will be turned into strings on the conversion back Other than that, all printable values should encode and decode with fidelity.
(json->edn x)
(json->edn x opts)
Recursively transforms JavaScript arrays into ClojureScript vectors, and JavaScript objects into ClojureScript maps.
Use to get fidelity restore of JSON data encoded with edn->json.
Recursively transforms JavaScript arrays into ClojureScript vectors, and JavaScript objects into ClojureScript maps. Use to get fidelity restore of JSON data encoded with edn->json.
(simple-js-type? x)
Return true for simple JS types. The intended use of this function is to detect if a value should be stored in its original form, for values that return false here, its expected that they get some encoding process before ending up as a JS value.
Return true for simple JS types. The intended use of this function is to detect if a value should be stored in its original form, for values that return false here, its expected that they get some encoding process before ending up as a JS value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close